<?php
	require_once '../../model/global.inc.php';  
?>
<?php
 if(isset($_GET['idProduct'])) {
	require_once "../json/JSON.php";
	$json = new Services_JSON();
	$id = $_GET['idProduct'];
	//convert php object to json 
	
	$result = mysql_query("SELECT tblbidhistory.bid_price, tblmember.email, tblmember.memid, tblmember.numbid FROM tblbidhistory, tblmember WHERE tblbidhistory.memid = tblmember.memid and tblbidhistory.pro_id = $id order by bid_id desc");            //query
        $data = array();
        while ($row = mysql_fetch_assoc($result, MYSQL_ASSOC)) { 
                $data[] = $row;  
        }

        $output = json_encode($data);
        print($output);
}
?>